using UnityEngine;
using UnityEngine.UIElements;

namespace MLTimeline.Editor
{
    public class ClipView : VisualElement
    {
        public int StartFrame { set; get; } = 25;
        public int EndFrame { set; get; } = 60;
        public ClipView()
        {
            CreateGUI();
        }

        private void CreateGUI()
        {
            var loader = TimelineEditorLoader.Instance;
            if (loader == null)
            {
                Debug.LogWarning("当前加载器不存在。");
                return;
            }
            if (loader.clipView == null)
            {
                Debug.LogWarning("clip-view.uxml文件不存在，请检查下，是否将uxml文件拖入TimelineEditorLoader.cs文件的Inspector面板内。");
                return;
            }
            loader.clipView.CloneTree(this);
        }


    }
}